<?php
namespace app\common\controller;

/**
 * 统计微信用户访问类
 * Created by PhpStorm.
 * User: tyll
 * Date: 2020/04/10
 * Time: 19:00
 */
class CountVisitorRecord {

    /**
     * 统计工位访问数量
     * @param $wsid
     * @return mixed
     */
    public function count_ws_vr_num($wsid){
        $maps = [];
        $maps[] = ['mini_page','=','ws_detail'];
        $maps[] = ['mini_params','=',$wsid];
        $num = model('visitor_record')->get_count($maps,'id');

        $data['num'] = $num;
        return $data;
    }

    /**
     * 统计首页访问数量
     * @return mixed
     */
    public function count_home_vr_num(){
        $maps = [];
        $maps[] = ['mini_page','=','home'];
        $num = model('visitor_record')->get_count($maps,'id');

        $data['num'] = $num;
        return $data;
    }
}